package com.ccl.iot;

public class IOTNetAPIConst {
	public static final int FALSE = 0;	//结果假
	public static final int TRUE = 1;	//结果真
	
	/**
	 * 判断结果是否为假
	 * @param aVar
	 * @param aVar	-	需判断的结果
	 * @return true表示结果为假，false表示结果为真
	 */
	public static boolean ISFALSE(int aVar){
		return aVar == FALSE;
	}
	
	/**
	 * 判断结果是否为真
	 * @param aVar	-	需判断的结果
	 * @return true表示结果为真，false表示结果为假
	 */
	public static boolean ISTRUE(int aVar){
		return ISFALSE(aVar) == false;
	}

	public static final int KCONNECTION_TIME_OUT = 10000;	//默认连接超时时间，单位：毫秒
	public static final int KCOMMAND_TIME_OUT = (KCONNECTION_TIME_OUT >> 4);	//默认指令超时单，单位：毫秒
	
	public static final int KINVALID_ID = 0;		//无效ID
	public static final long KMAX_ID = Long.MAX_VALUE;	//最大ID值
	public static final int KINVALID_DEVICE_ID = 0;	//无效的设备ID
	public static final long KMAX_DEVICE_ID = KMAX_ID;	//最大设备ID
	public static final int KINVALID_USER_ID = 0;	//无效用户ID
	public static final long KMAX_USER_ID = KMAX_ID;	//最大用户ID
	public static final int KINVALID_BATCH_ID = 0;	//无效批处理ID
	public static final long KMAX_BATCH_ID = KMAX_ID;	//最大批处理ID
	public static final int KINVALID_BATCH_ITEM_ID = 0;	//无效批处理项目ID
	public static final long KMAX_BATCH_ITEM_ID = KMAX_ID;		//最大批处理项目ID
	
	public static final int KIOT_SECURITY_CODE_LENGTH = 6;		//安全校验码长度
	
	public static final int KNOTIFY_CONTENT_MAX_LENGTH = 64;		//系统通知内容最大长度
	
	public static final int KIOT_USER_NAME_MAX_LENGTH	= 32;	//用户账号最大长度
	public static final int KIOT_PASSWORD_MAX_LENGTH	= 32;	//用户密码最大长度
	
	public static final int KIOT_MOBILE_MAX_LENGTH	= 32;	//移动手机号码最大长度
	public static final int KIOT_EMAIL_MAX_LENGTH	= 64;	//电子邮箱账号最大长度
	public static final int KIOT_FP_QUESTION_MAX_LENGTH	= 64;	//忘记密码问题最大长度
	public static final int KIOT_FP_ANSWER_MAX_LENGTH	= 64;	//忘记密码答案最大长度

	public static final int KIOT_INFO_NAME_MAX_LENGTH = 16;	//扩展信息名称最大长度
	public static final int KIOT_INFO_VALUE_MAX_LENGTH = 64;	//扩展信息数据最大长度
	
	public static final int KIOT_DEVICE_REGISTER_MAX_PAGE = 4;	//设备寄存器最大分页数
	public static final int KIOT_DEVICE_REGISTER_PAGE_SIZE = 128;	//设备寄存器单页尺寸，单位：字节
	public static final int KIOT_DEVICE_REGISTER_MAX_SIZE = KIOT_DEVICE_REGISTER_PAGE_SIZE * KIOT_DEVICE_REGISTER_MAX_PAGE;	//设备寄存器最大尺寸
	
	public static final int KIOT_BATCH_NAME_MAX_LENGTH	= 32;	//批处理命令名称最大长度
	public static final int KIOT_BATCH_ITEM_CAPATICY = 64;	//批处理命令最大项目容量
	public static final int KIOT_BATCH_ITEM_DATA_MAX_LENGTH	= KIOT_DEVICE_REGISTER_PAGE_SIZE;	//批处理命令项目最大数据长度
	
	public static final int  KPUSH_DEVICE_NAME_MAX_LENGTH	 = 32;	//推送触发器中设备名称的最大长度
	public static final int  KPUSH_TRIGGER_NAME_MAX_LENGTH = 32;	//推送触发器名称最大长度
	public static final int  KPUSH_RECEIVER_TOKEN_MAX_LENGTH = 32;	//推送接收器信令最大长度

}
